package ylg.com.cn.youtube._data.source;

import android.support.annotation.Nullable;

import ylg.com.cn.youtube._data.User;

/**
 * Created by MyPC on 2017/1/11.
 */
public interface UserDataSource {

    /**/
    interface LoginCallBack {
        //成功获取数据;
        void onLoginSuccess(User user);
        //获取数据失败后的结果;
        void onLoginError(String message);
    }

    /* 登录*/
    void login(
            @Nullable String name,
            @Nullable String password,
            LoginCallBack callBack
    );

    /* 注册 */
    void register(
            @Nullable String name,
            @Nullable String password,
            @Nullable String phonenumber,
            LoginCallBack callBack
    );


}
